﻿using System;
using Microsoft.AspNetCore.Mvc;
using System.Xml.Linq;
using VegetableSale.NET.Dao;
using VegetableSale.NET.Entities;
using VegetableSale.NET.Services;

namespace VegetableSale.NET.Controllers;

[ApiController]
[Route("api/[Action]")]
public class RefundController : Controller
{
    private RefundService refundService = new RefundService();

    [HttpPost(Name = "refundlist")]
    public Result refundlist([FromBody] QueryDTO queryDTO)
    {
        return refundService.getRefundList(queryDTO);
    }

    [HttpPost(Name = "refundaddrefund")]
    public Result refundaddrefund([FromBody] RefundAddQuery refundAddQuery)
    {
        return refundService.addRefund(refundAddQuery);
    }
}
